package com.chj.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.chj.entity.ECar;
import com.chj.util.ResultSetUtil;
import com.etc.jdbc.mapper.RowMapper;

public class ECarMapper implements RowMapper<ECar>{

    @Override
    public ECar mapRow(ResultSet rs) throws SQLException {

        ECar eCar = new ECar();

        eCar.setEcarPk(ResultSetUtil.getString(rs,"ecar_pk")); //ecar_pk
        eCar.setEcarId(ResultSetUtil.getString(rs,"ecar_id"));//ecar_id
        eCar.setEcarName(ResultSetUtil.getString(rs,"ecar_name"));//ecar_name
        eCar.setEcarTime(ResultSetUtil.getInt(rs,"ecar_time"));//ecar_time
        eCar.setEcarDescription(ResultSetUtil.getString(rs,"ecar_description"));//ecar_description
        eCar.setEcarsTatus(ResultSetUtil.getInt(rs,"ecar_status"));//ecar_status
        eCar.setEcarType(ResultSetUtil.getInt(rs,"ecar_type"));//ecar_type
        eCar.setUserId(ResultSetUtil.getString(rs,"user_id"));//user_id
        eCar.setCreateDate(ResultSetUtil.getDate(rs,"create_date"));//create_date
        eCar.setModifyDate(ResultSetUtil.getDate(rs,"modify_date"));//modify_date
        eCar.setDeleteDate(ResultSetUtil.getDate(rs,"delete_date"));//delete_date
        eCar.setStatus(ResultSetUtil.getInt(rs,"status"));//status

        return eCar;
    }

}
